GATE CSE 2015 SET-3
Q21.
Consider a network connecting two systems located 8000 kilometers apart. The bandwidth of the network is 500x10^{6} bits per second. The propagation speed of the media is 4x10^{6} meters per second. It is needed to design a Go-Back-N sliding window protocol for this network. The average packet size is 10^{7} bits. The network is to be used to its full capacity. Assume that processing delays at nodes are negligible. Then, the minimum size in bits of the sequence number field has to be ___________.Q22.
Consider the following C program. #include < stdio.h > int f1(void); int f2(void); int f3(void); int x = 10; int main( ) { int x = 1; x += f1( ) + f2( ) + f3( ) + f2( ); printf("%d", x); return 0; } int f1() { int x = 25; x++; return x;} int f2() { static int x = 50; x++; return x;} int f3() { x *= 10; return x}; The output of the program is ________.Q23.
Suppose c=(c[0],...,c[k-1]) is an array of length k, where all the entries are from the set {0,1}. For any positive integers a and n, consider the following pseudocode. If k=4, c=(1,0,1,1), a=2 and n=8, then the output of DOSOMETHING(c,a,n) is _____.Q24.
Consider the following recursive C function. void get(int n) { if (n<1) return; get(n-1); get(n-3); printf("%d", n); } If get(6) function is being called in main()then how many times will the get()function be invoked before returning to the main()?Q25.
Given a hash table T with 25 slots that stores 2000 elements, the load factor \alpha for T is ____________.Q26.
Consider the following array of elements. (89,19,50,17,12,15,2,5,7,11,6,9,100) The minimum number of interchanges needed to convert it into a max-heap isQ27.
In the given matrix \begin{bmatrix} 1 & -1&2 \\ 0& 1 & 0\\ 1&2 & 1 \end{bmatrix}, one of the eigenvalues is 1. The eigenvectors corresponding to the eigenvalue 1 areQ28.
If the following system has non-trivial solution, px+qy+rz=0 qx+ry+pz=0 rx+py+qz=0, then which one of the following options is TRUE?Q29.
Let G be a connected undirected graph of 100 vertices and 300 edges. The weight of a minimum spanning tree of G is 500. When the weight of each edge of G is increased by five, the weight of a minimum spanning tree becomes ________.Q30.
Let L be the language represented by the regular expression \Sigma ^{*}0011\Sigma ^{*} where \Sigma={0,1}. What is the minimum number of states in a DFA that recognizes \bar{L} (complement of L)?